<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

//Route::get('/', function () {
   // return view('welcome');
//});

//建立前台路由//
Route::group([],function(){
//================================前后台登陆注册开始================================================================
//前台访问方式 www.mimi.com
Route::get('/vhome','Vhome\IndexController@index');
//前台注册页面路由 访问方式www.mimi.com/Vhome/register/register
Route::get('/vhome/register','Vhome\Register\RegisterController@register');
//前台页面注册操作
Route::post('/vhome/register/insert','Vhome\Register\RegisterController@insert');
//前台注册验证码
Route::get('/vhome/register/vcode','Vhome\Register\RegisterController@vcode');
//前台登陆访问方式
Route::post('/vhome/checkLogin','Vhome\LoginController@checkLogin');
//检测是否重复登录
Route::get('/vhome/login','Vhome\LoginController@login');
//前台退出
Route::get('/vhome/logout','Vhome\LoginController@logout');
});

//================================前台登陆注册结束================================================================


//================================后台登陆开始结束================================================================
//建立后台路由
Route::group(['middleware'=>'login'],function(){
	//后台访问方式 www.mimi.com/vadmin/index
	Route::get('/vadmin/index','Vadmin\IndexController@index');
});
Route::post('/Vadmin/checkLogin','Vadmin\LoginController@checkLogin');
Route::get('/vadmin/login','Vadmin\LoginController@login');
Route::get('/vadmin/logout','Vadmin\LoginController@logout');
//================================后台登陆注册结束================================================================


//================================前台商品详情开始===================================================================
Route::group([],function(){
//商品详情首页
Route::get('/vhome/goods/{id}','Vhome\GoodsController@show');
//商品详情遍历
//Route::get('/vhome/goodsdetails/show','Vhome\Details\GoodsdetailsController@show');
});





//================================前台商品详情结束===================================================================